import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import javax.swing.JFileChooser;
import javax.swing.filechooser.FileFilter;


public class IO_Memoria {
	

	
	
	public static void writeToFile(String text, String as){
		try{
			BufferedWriter bw=new BufferedWriter(new FileWriter(new File("f:\\"+as+".txt")));
			bw.write(text);
			bw.newLine();
			bw.close();
		
		}catch(Exception e){
			}
		}
	
	public static void readFile(String as){
		try{
		InputStream is= new FileInputStream("f:\\"+as+".txt");
		BufferedReader br= new BufferedReader(new InputStreamReader(is));
		String line;
		while ((line=br.readLine())!=null){
			System.out.println(line);
		}
		br.close();
		}catch (Exception e){
		}
		
	}
	
	public static void main(String []args) throws Exception{
		
	
	}
}


	
